|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectj3deditor.bin.hierarchy.HierarchyNode
j3deditor.bin.hierarchy.J3DeObject
j3deditor.bin.hierarchy.J3DeLight
public class J3DeLight
Contains and manages an instance of
javax.media.j3d.Light.
Light| Constructor Summary | |
|---|---|
J3DeLight()
Creates an empty J3DeLight object. |
|
J3DeLight(LightType type)
Creates an instance of J3DeLight with the given type. |
|
| Method Summary | |
|---|---|
HierarchyNode |
clone(HierarchyNode node)
Clones this node. |
int[] |
getAttenuation()
Returns the attenuation values of the Light object
if this is pointlight. |
float[] |
getBoundsPosition()
Returns the coordinates of the center of BoundingSphere. |
float |
getBoundsRadius()
Returns the radius of BoundingSphere. |
java.awt.Color |
getColor()
Returns the color of the Light object. |
int |
getConcentration()
Returns the concentration value of this Light object
if this is spotlight. |
boolean |
getEnable()
Tests if the Light object is enabled. |
int |
getLightType()
Returns the type of this light. |
int |
getSpreadAngle()
Returns the spread angle of this Light object
if this is spotlight. |
void |
init3DObject(javax.media.j3d.Node obj)
Applies the given Node object to this node. |
void |
setAttenuation(int constant,
int linear,
int quadratic)
Sets the attenuation values of the Light object
if this is pointlight. |
void |
setBoundsPosition(float x,
float y,
float z)
Sets the coordinates of the center of BoundingSphere. |
void |
setBoundsRadius(float radius)
Sets the radius of BoundingSphere. |
void |
setColor(java.awt.Color color)
Sets the color of this light. |
void |
setConcentration(int conc)
Sets the concentration value of the Light object
if this is spotlight. |
void |
setEnable(boolean state)
Passes the given state to the Light object. |
void |
setSpreadAngle(int spread)
Sets the spread angle of the Light object
if this is spotlight. |
| Methods inherited from class j3deditor.bin.hierarchy.J3DeObject |
|---|
delete, get3DObject, getObject, getRotationZ, getRotationX, getRotationY, getScaleZ, getScaleX, getScaleY, getTranslationZ, getTranslationX, getTranslationY, initObject, rotate, rotateZ, rotateX, rotateY, scale, scaleAll, scaleZ, scaleX, scaleY, setNode, setObject, translate, translateZ, translateX, translateY |
| Methods inherited from class j3deditor.bin.hierarchy.HierarchyNode |
|---|
equals, getChild, getIndex, getIndexOfChild, getNumberOfChildren, getParent, getParent, getType, hasNamedChild, removeChild, setName, setParent, toString, updateName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public J3DeLight()
J3DeLight object.
Requires initialization with init3DObject() method
public J3DeLight(LightType type)
J3DeLight with the given type.
type - the type of the light| Method Detail |
|---|
public void init3DObject(javax.media.j3d.Node obj)
Node object to this node.
obj - object to be applied to this nodepublic HierarchyNode clone(HierarchyNode node)
clone in class J3DeObjectnode - object sent by subclass, otherwise null
public int getLightType()
public boolean getEnable()
Light object is enabled.
true if Light is enabled,
otherwise falseLight.getEnable()public void setEnable(boolean state)
Light object.
state - true if light is enabled,
otherwise falseLight.setEnable(boolean state)public java.awt.Color getColor()
Light object.
Light.getColor(Color3f color)public void setColor(java.awt.Color color)
color - new colorLight.setColor(Color3f color)public int[] getAttenuation()
Light object
if this is pointlight.
PointLight.getAttenuation(Point3f a)
public void setAttenuation(int constant,
int linear,
int quadratic)
Light object
if this is pointlight.
constant - value of constant attenuationlinear - value of linear attenuationquadratic - value of quadratic attenuationPointLight.setAttenuation(float c, float l, float q)public int getConcentration()
Light object
if this is spotlight.
SpotLight.getConcentration()public void setConcentration(int conc)
Light object
if this is spotlight.
conc - value of concentrationSpotLight.setConcentration(float c)public int getSpreadAngle()
Light object
if this is spotlight.
SpotLight.getSpreadAngle()public void setSpreadAngle(int spread)
Light object
if this is spotlight.
spread - spread angleSpotLight.setSpreadAngle(float a)public float getBoundsRadius()
BoundingSphere.
BoundingSpherepublic void setBoundsRadius(float radius)
BoundingSphere.
radius - new radiuspublic float[] getBoundsPosition()
BoundingSphere.
public void setBoundsPosition(float x,
float y,
float z)
BoundingSphere.
x - coordinate on X-axisy - coordinate on Y-axisz - coordinate on Z-axis
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||